import axios, {ResponseData} from 'yuxin-base/src/utils/axios'

export default {
	/**
	 * 获取账单表信息列表
	 * @param data
	 */
	financeBillList(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill/list',
			data,
			method: 'POST'
		})
	},
	/**
	 * 获取账单列表统计信息
	 * @param data
	 */
	financeBillCount(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill/count',
			data,
			method: 'POST'
		})
	},
	/**
	 * 导出账单列表
	 * @param data
	 */
	financeBillExport(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill/export',
			data,
			method: 'POST',
			responseType: 'blob'
		})
	},
	/**
	 * 获取账单明细列表
	 * @param data
	 */
	billDetailList(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_detail/list',
			data,
			method: 'POST'
		})
	},
	/**
	 * 账单明细列表统计信息
	 * @param data
	 */
	billDetailCount(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_detail/count',
			data,
			method: 'POST'
		})
	},
	/**
	 * 导出账单明细列表
	 * @param data
	 */
	billDetailExport(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_detail/export',
			data,
			responseType: 'blob',
			method: 'POST'
		})
	},
	/**
	 * 查询流水列表
	 * @param data
	 */
	billFlowList(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_flow/list',
			data,
			method: 'POST'
		})
	},
	/**
	 * 账单流水列表统计
	 * @param data
	 */
	billFlowCount(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_flow/count',
			data,
			method: 'POST'
		})
	},
	/**
	 * 导出账单流水列表
	 * @param data
	 */
	billFlowExport(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_flow/export',
			data,
			responseType: 'blob',
			method: 'POST'
		})
	},
	/**
	 * 导出账单流水明细
	 * @param data
	 */
	billFlowExportDetail(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/basesearch/finance_bill_flow/export_detail',
			data,
			responseType: 'blob',
			method: 'POST'
		})
	},
	/**
	 * 未结清押金
	 * @param bizId 合同id
	 */
	unclearedDeposit(bizId: string): Promise<ResponseData> {
		return axios.request({
			url: `/finance/finance_bill_detail/renter_uncleared_deposit/${bizId}`,
			method: 'get'
		})
	},
	/**
	 * 能源费导入数据 操作记录 分页查询接口
	 * @param data
	 */
	eneryPage(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/finance/finance_enery/page',
			data,
			method: 'POST'
		})
	},
	/**
	 * 能源费导入数据 操作记录 分页查询接口
	 * @param data
	 */
	recordPage(data: object): Promise<ResponseData> {
		return axios.request({
			url: '/finance/finance_enery_record/page',
			data,
			method: 'POST'
		})
	},
	/**
	 * 获取进件列表
	 * @param data
	 */
	getMerchatInfos(data: any): Promise<ResponseData> {
		return axios.request({
			url: '/payment/pay_acount/merchat_infos',
			data,
			method: 'post'
		})
	}
}
